<template>
    <view class="Records">
        <titleBox title="使用记录"></titleBox>
        <block v-if="goods.order_info.delivery == 1">
            <view class="row m-top18">
                <text class="Records-title" user-select>订单号：</text>
                <text class="Records-txt" user-select>{{ goods.order_info.order_code }}</text>
            </view>
            <view class="row m-top18">
                <text class="Records-title" user-select>使用时间：</text>
                <text class="Records-txt" user-select>{{ goods.order_info.add_time }}</text>
            </view>
            <!-- <view class="row m-top18">
                <text class="Records-title" user-select>使用门店：</text>
                <text class="Records-txt" user-select>{{ goods.order_info.shop_name }}</text>
            </view> -->
            <view class="row m-top18" v-if="goods.order_info.uname">
                <text class="Records-title" user-select>姓名：</text>
                <text class="Records-txt" user-select>{{ goods.order_info.uname }}</text>
            </view>
            <view class="row m-top18" v-if="goods.order_info.utel">
                <text class="Records-title" user-select>电话：</text>
                <text class="Records-txt" user-select>{{ goods.order_info.utel }}</text>
            </view>
            <view class="row m-top18" v-if="goods.order_info.address">
                <text class="Records-title" user-select>收货地址：</text>
                <text class="Records-txt" user-select>{{ goods.order_info.address }}</text>
            </view>
        </block>
        <block v-else>
            <view class="row m-top18">
                <text class="Records-title" user-select>消费码：</text>
                <text class="Records-txt" user-select>{{ pageData.use_code }}</text>
            </view>
            <view class="row m-top18">
                <text class="Records-title" user-select>使用时间：</text>
                <text class="Records-txt" user-select>{{ pageData.use_time }}</text>
            </view>
            <view class="row m-top18" v-if="pageData.check_shop">
                <text class="Records-title" user-select>核销门店：</text>
                <text class="Records-txt" user-select>{{ pageData.check_shop }}</text>
            </view>
            <view class="row m-top18" v-if="pageData.staffs">
                <text class="Records-title" user-select>核销员工：</text>
                <text class="Records-txt" user-select>{{ pageData.staff }}</text>
            </view>
        </block>
        <view class="lookOrder" v-if="goods.is_show == 1" @click="toUrl(`/orderPage/order/orderDetail?order_id=${pageData.order_id}`)">订单详情</view>
    </view>
</template>

<script>
    import titleBox from '@/subCard/components/titleBox.vue';
    export default {
        props: ['pageData', 'goods'],
        components: {
            titleBox
        },
        data() {
            return {};
        },
        methods: {}
    };
</script>

<style lang="scss" scoped>
    .Records {
        width: 690rpx;
        margin: 24rpx auto 0;
        background-color: #ffffff;
        padding: 20rpx;
        border-radius: 10rpx;

        &-title {
            min-width: 150rpx;
            color: #333;
            font-size: 30rpx;
            text-align: right;
        }

        &-txt {
            flex: 1;
            color: #333;
            font-size: 30rpx;
        }

        .lookOrder {
            width: 260rpx;
            height: 70rpx;
            margin: 24rpx auto 10rpx;
            border: 1px solid #e4e4e4;
            border-radius: 10rpx;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 28rpx;
            color: #333;
        }
    }
</style>
